package com.doudanhua.basecode.mvc;

/**
 * @Author zhangqian
 * @Description TODO
 * @Date 2022/11/9 20:37
 */
public class ResultException extends RuntimeException{
    private ApiResult result;

    public ResultException(int code, String message) {
        this(new ApiResult(code, message));
    }

    public ResultException(ApiResult result) {
        this(result, null);
    }

    public ResultException(ApiResult result, Throwable cause) {
        super(result.getMsg(), cause);
        this.result = result;
    }

    public ApiResult getResult() {
        return result;
    }
}
